home *** CD-ROM | disk | FTP | other *** search
- \ F-INIT - intialize things like COLD but no QUIT 18Mar84RSW
- FORTH DEFINITIONS HEX
- ( This is for MVP-FORTH ver 1.0305.0X only )
-
- VARIABLE OLD-COLD \ storage for no parameter startup routine
-
- : F-INIT ( -- ) \ like MVP COLD routine
- EMPTY-BUFFERS
- 11D 14D @ 6 + 30 CMOVE
- 1 DENSITY ! FIRST USE ! FIRST PREV ! DR0
- 0 EPRINT !
- 11B @ ' FORTH 2+ !
- [COMPILE] DECIMAL
- SP! ?STACK
- [COMPILE] FORTH DEFINITIONS \ but does not vector to QUIT
- ; DECIMAL -->
- \ ?AUTO-RUN new coldstart routine 18Mar84RSW
- FORTH DEFINITIONS HEX
- : ?AUTO-RUN F-INIT \ do initialization
- 80 DUP C@ ?DUP IF \ parameters passed?
- 1- SWAP 2+ SWAP ( ad1 n -- ) \ YES - set up string
- 1 BUFFER ( ad1 n ad2 -- )
- DUP 400 0 FILL \ null out buffer to use
- SWAP CMOVE 0 >IN ! 1 BLK ! \ move into BLOCK BUFFER 1
- RP! INTERPRET \ do as directed on cmd line
- EMPTY-BUFFERS CR ." OK"
- ABORT \ leave in good state
- ELSE
- DROP OLD-COLD @ EXECUTE \ NO - do non-parameter stuff
- THEN ; DECIMAL -->
-
-
- \ install ?AUTO-RUN new coldstart routine 18Mar84RSW
- FORTH DEFINITIONS HEX
-
- 117 CONSTANT STARTVEC ( MVP-FORTH 1.0305.0X startup vector )
-
- STARTVEC @ @ OLD-COLD ! ( save old startup routine )
-
- ' ?AUTO-RUN CFA STARTVEC @ ! ( set new startup routine )
-
- FREEZE DECIMAL EXIT
-
-
-
-
-
-
- ( automatic command run description ) EXIT 18Mar84RSW
- The preceeding screens install a new cold start routine
- in the MVP-Forth interpreter. This new ?AUTO-RUN routine will
- process and run any legal interpretive Forth commands passed to
- it on the DOS command line (ie. after the program name). Up to
- about 124 significant letters can be interpreted in this manner
- before the input source is returned to the console. If no
- commands are given on the command line - nothing will be
- automatically done and the Forth interpreter will sign on in the
- normal fashion. For example:
- A>forthse4 FF RESETLP DOCCHAR BYE
-
- A>_
- will formfeed the line printer, set it to elite character mode
- and then return to DOS without the user having to type anything.
- This is intended to make FORTHSE4.COM usable in a .BAT file.
- nd then return to DOS without the user having to typ